<?php
/**
 * Created by PhpStorm.
 * User: alinejun
 * Date: 2019/1/7
 * Time: 22:53
 */
namespace app\common\validate;
class Category extends \app\common\validate\ValidateBase
{
    // 验证规则
    protected $rule =   [
        'name'          => 'require',
        'describe'   => 'require',
    ];

    // 验证提示
    protected $message  =   [
        'name.require'         => '分类名不能为空',
        'describe.require'      => '分类介绍不能为空',
    ];

    // 应用场景
    protected $scene = [
        'edit'  =>  ['name', 'describe']
    ];
}